﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Extensions.DependencyInjection;
using FireBillBook.Core.Services;
using FireBillBook.Core.Services.Interfaces;

namespace FireBillBook.Core.Extensions
{
    public static class PlatformServiceFactoryServiceExtension
    {
        public static IServiceCollection AddPlatformServiceFactory(this IServiceCollection services)
        {
            services.AddSingleton<PlatformServiceFactory>();
            services.AddSingleton<IPlatformServiceFactory>(serviceProvider => serviceProvider.GetRequiredService<PlatformServiceFactory>());
            return services;
        }
    }
}
